package com.xuanrui.commons.enums;

/** 钻石消耗方式
 * 1为注册2为充值3坐下4退分5礼物6活动7后台 8同步转出 9同步转入10签到11每日奖励12分享赠送,只有11没有统计
 * @author afeng
 * @version 1.0
 * @date 2022/10/19 上午1:42
 */
public enum DiamondConsumeTypeEnum {
    REGISTER_GIVE(1, "注册赠送"),
    RECHARGE(2, "充值"),
    SITE_DOWN(3, "坐下"),
    BACK_POINT(4, "退分"),
    GIFT(5, "礼物"),
    ACTIVE_REWARD(6, "活动"),
    BACK_RECHARGE(7, "后台充值"),
    SYNC_TRANSFER(8, "同步转出"),
    SYNC_INTO(9, "同步转入"),
    SIGN_REWARD(10, "签到"),
    DAILY_REWARD(11, "每日奖励"),
    SHARE_GIVE(12, "分享赠送"),

    ;

    private int type;
    private String desc;

    DiamondConsumeTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getDiamondConsumeTypeEnum(int type) {

        for (DiamondConsumeTypeEnum var : DiamondConsumeTypeEnum.values()) {
            if (type == var.getType())
                return var.getDesc();
        }
        return "--";
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
